﻿using Model;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Manager
{
    public class PersonManager : MarshalByRefObject
    {
        public List<Person> GetList()
        {
            List<Person> personList = new List<Person>();
            FileStream stream = new FileStream("DataSource.sour", FileMode.Open, FileAccess.Read);  //在服务器文件里面获取虚拟数据            BinaryFormatter formatter =new BinaryFormatter();            personList=(List<Person>)formatter.Deserialize(stream);  //对虚拟数据进行反序列化获取集合
            return personList;
        }
    }
}
